package com.wenli.lt.service.impl;

import com.wenli.lt.entity.College;
import com.wenli.lt.mapper.CollegeMapper;
import com.wenli.lt.service.ICollegeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.UUID;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lt
 * @since 2021-03-21
 */
@Service
public class CollegeServiceImpl extends ServiceImpl<CollegeMapper, College> implements ICollegeService {

    @Autowired
    CollegeMapper collegeMapper;
    @Override
    public boolean addCollege(College college) {
        college.setCollegeId(UUID.randomUUID().toString().replace("-",""));
        return 1 == collegeMapper.insert(college);
    }

    @Override
    public Object getCollege() {
        return null;
    }
}
